﻿using Microsoft.Extensions.DependencyInjection;
using System;
using Test.EventBus2.Core;
using Test.EventBus2.Message.Events.Orders;
using Test.EventBus2.Payment.Handlers;

namespace Test.EventBus2.Payment
{
    class Program
    {
        static void Main(string[] args)
        {
            var services = new ServiceCollection();
            services.UseKafkaSubsrcibeStore().AddEventBus().AddRebusHandler<PaymentHandler>().UseEventBus(bus => {
                bus.HandleEvent();


            });

            services.AddSubscrbe<PayemntEvent>();
           
            Console.Read();
        }
    }
}
